package com.mars.task;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.fastjson.JSON;

public class SendMainlJob implements Job {
	
	private Logger logger = LoggerFactory.getLogger(getClass()) ;

	@Override
	public void execute(JobExecutionContext ctx) throws JobExecutionException {
		logger.debug("定时发送邮件....");
		
		JobDataMap jobDataMap = ctx.getJobDetail().getJobDataMap() ;
		JobDataMap triggerDataMap = ctx.getTrigger().getJobDataMap() ;
		
		logger.debug(JSON.toJSON(jobDataMap.getKeys()) + " ==>> " + JSON.toJSON(jobDataMap.values()));
		logger.debug(JSON.toJSON(triggerDataMap.getKeys()) + " ==>> " + JSON.toJSON(triggerDataMap.values()));
		
		System.out.println("");
	}

}
